<form class="layui-form layui-form-pane edit-form">
    {if !$data['id']}
    <div class="layui-form-item">
        <label class="layui-form-label">
            后台模块
        </label>
        <div class="layui-input-block">
            <select lay-verify="required" name="type">
                {foreach $type as $k=>$v}
                {if $data['type'] == $k}
                <option selected="" value="{$k}">
                    {$v}
                </option>
                {else}
                <option value="{$k}">
                    {$v}
                </option>
                {/if}
                {/foreach}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            模块路径
        </label>
        <div class="layui-input-block">
            <input autocomplete="off" class="layui-input" lay-verify="required" name="route" type="text" value="{$data['route']}"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            库表前缀
        </label>
        <div class="layui-input-block">
            <input autocomplete="off" class="layui-input" name="prefix" type="text" value="{$data['prefix']}"/>
        </div>
    </div>
    {/if}
    <div class="layui-form-item">
        <label class="layui-form-label">
            模块名称
        </label>
        <div class="layui-input-block">
            <input autocomplete="off" class="layui-input" lay-verify="required" name="name" type="text" value="{$data['name']}"/>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-filter="editform" lay-submit="">
                保存
            </button>
            <button class="layui-btn layui-btn-primary layui-btn-cancel" type="button">
                取消
            </button>
        </div>
    </div>
</form>
